import request from '@/utils/request'

const api_name = '/admin/hosp/hospitalSet'

export default{
    getHospSetList(page, limit, searchObj) {
        return request({
            url: `${api_name}/findPageHospSet/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    //删除医院设置
    deleteHospSet(id){
        return request({
            url:`${api_name}/${id}`,
            method:'delete'
        })
    },
    //批量删除医院设置
    batchRemoveHospSet(idList){
        return request({
            url:`${api_name}/batchRemove`,
            data:idList,
            method:'delete'
        })
    },
    //锁定和取消锁定
    lockHospSet(id,status) {
        return request ({
          url: `${api_name}/lockHospitalSet/${id}/${status}`,
          method: 'put'
        })
    },
    //添加医院设置
    saveHospSet(hospitalSet){
        return request({
            url:`${api_name}/saveHospitalSet`,
            method:'post',
            data:hospitalSet
        })
    },
    //根据医院设置查询id
    getHospSet(id){
        return request({
            url:`${api_name}/getHospSet/${id}`,
            method:'get',
        })
    },
    //修改医院设置
    updateHospSet(hospitalSet){
        return request({
            url:`${api_name}/updateHospitalSet`,
            method:'post',
            data:hospitalSet
        })
    },
}
